home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / exec / findsemaphore.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  64 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: findsemaphore.c,v 1.4 1996/08/13 13:56:02 digulla Exp $
  4.     $Log: findsemaphore.c,v $
  5.     Revision 1.4  1996/08/13 13:56:02  digulla
  6.     Replaced __AROS_LA by __AROS_LHA
  7.     Replaced some __AROS_LH*I by __AROS_LH*
  8.     Sorted and added includes
  9.  
  10.     Revision 1.3  1996/08/01 17:41:11  digulla
  11.     Added standard header for all files
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include <exec/execbase.h>
  17. #include <aros/libcall.h>
  18.  
  19. /*****************************************************************************
  20.  
  21.     NAME */
  22.     #include <clib/exec_protos.h>
  23.  
  24.     __AROS_LH1(struct SignalSemaphore *, FindSemaphore,
  25.  
  26. /*  SYNOPSIS */
  27.     __AROS_LHA(STRPTR, name, A1),
  28.  
  29. /*  LOCATION */
  30.     struct ExecBase *, SysBase, 99, Exec)
  31.  
  32. /*  FUNCTION
  33.     Find a semaphore with a given name in the system global semaphore list.
  34.     Note that this call doesn't arbitrate for the list - use Forbid() to
  35.     do this yourself.
  36.  
  37.     INPUTS
  38.     name - Pointer to name.
  39.  
  40.     RESULT
  41.     Address of semaphore structure found or NULL.
  42.  
  43.     NOTES
  44.  
  45.     EXAMPLE
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.  
  51.     INTERNALS
  52.  
  53.     HISTORY
  54.  
  55. ******************************************************************************/
  56. {
  57.     __AROS_FUNC_INIT
  58.  
  59.     /* Nothing spectacular - just look into the list */
  60.     return (struct SignalSemaphore *)FindName(&SysBase->SemaphoreList,name);
  61.     __AROS_FUNC_EXIT
  62. } /* FindSemaphore */
  63.  
  64.